home *** CD-ROM | disk | FTP | other *** search
/ Imagine the Universe (9th Edition) / Imagine the Universe 9 - Disc 1.iso / pc / imagine / YBA / HTCas-size / javascript / htcas-xray.js < prev    next >
Text File  |  2003-01-12  |  543b  |  26 lines

  1. size = "Blank";
  2.  
  3. function checkme() {
  4. size = document.xray.size.value - 0;
  5. if (!size) {size = "Blank";}
  6.  
  7. RightOnFile = './htcas-correct.html';
  8. TryAgainFile = './htcas-close.html';
  9. WayWrongFile = './htcas-wrong.html';
  10.  
  11. low_wrong = 100000;
  12. low_good  = 105000;
  13. hi_good   = 115000;
  14. hi_wrong  = 120000;
  15.  
  16. if ((size != "Blank") && (size >= low_good) && (size <= hi_good)) {
  17.     location = RightOnFile;
  18. }
  19. else if ((size == "Blank") || ((size < low_wrong) || (size > hi_wrong))) {
  20.     location = WayWrongFile;
  21. }
  22. else {
  23.     location = TryAgainFile;
  24. }
  25. }
  26.